package com.hayabusa.config;

import com.hayabusa.interceptor.LoginInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 本类用来演示: Springboot为了延续使用springmvc功能的配置类
 *
 * @author: success
 * @date: 2021/4/12 2:20 下午
 */
@Configuration
public class LoginConfig implements WebMvcConfigurer {
    @Autowired
    private LoginInterceptor loginInterceptor;

//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginInterceptor)
//                .addPathPatterns("/**")//拦截器一切请求
//                .excludePathPatterns("/sendCode","/logins")
//                .excludePathPatterns("/user/userList");
//        ;
//    }
}